package 华为.text108_求最小公倍数;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int A = scanner.nextInt();
        int B = scanner.nextInt();
        // 最小公倍数= 两数的最大公约数 * 两数除以公约数的商 的乘积
        int min = A>B?B:A;
        int num=0;
        for (int i = 2; i <= min; i++) {
            if (A%i==0&&B%i==0){
                num=i;
            }
        }

        int result = num==0?A*B:(A*B/(num));

        System.out.println("所以"+A+"和"+B+"的最小公倍数是"+result);
    }
}
